home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / off_09.zip / WRITER.OFF < prev    next >
Text File  |  1993-01-12  |  24KB  |  576 lines

  1. %endcol 74
  2. %startcol 10
  3. %parindent 0
  4. %header Introduction %right Page %pn
  5. %footer V. Dimakopoulos %right %[O F F %] Writer's Manual
  6. %defmacro off
  7. %bold OFF %norm %endmacro
  8. %defmacro off.
  9. %bold OFF. %norm %endmacro
  10. %defmacro off'
  11. %bold OFF' %norm %endmacro
  12. %defmacro reader
  13. %bold OFF Reader's Guide %norm %endmacro
  14. %defmacro title
  15. %norm
  16. %verb 
  17. %verb 
  18. %endmacro
  19. %defmacro example
  20. %begin verb
  21. %bold    Document                                                        OFF output
  22. %norm %endmacro
  23. %begin verb
  24.  -----------------------------------------------------------------------------
  25.  %bold __    ___  ___
  26.  /  \\  |__  |__
  27.  \\__/  |    |
  28.  %norm
  29.  
  30.  An Informal Documentation Formatter
  31.  
  32.  -----------------------------------------------------------------------------
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                                 %revWRITER'S GUIDE%norm
  41.  
  42.                            %boldVassilis V. Dimakopoulos
  43.  
  44.  
  45.                      --- Last Revision: January 1993 ---%norm
  46. %end
  47.  
  48. %pageno 0 %hshow 1
  49. %newpage
  50. %fshow 1
  51.  
  52. %under %center QUICK OVERVIEW
  53. %title
  54. %off will do certain things for your documents, like 
  55.  
  56. %list
  57. %item format your paragraphs
  58. %item center lines
  59. %item put attributes on the screen (e.g. bold, reverse, etc.)
  60. %item create lists of things
  61. %endlist
  62.  
  63. Just write your document in any text editor without worrying for the
  64. visual beauty of it. You only have to put some simple keywords in some
  65. places that %off will understand later to
  66. format your document. When finished just run %off on your file
  67. and watch the result.
  68.  
  69. Consult the %reader %norm for %off's options.
  70.  
  71. %verb
  72. %verb
  73. %verb
  74. %under %center STARTING
  75. %title
  76.  
  77. Your document consists of paragraphs and commands. The commands
  78. affect the appearance of paragraphs. A paragraph is a set of
  79. contiguous lines that ends with a blank line. This means that a
  80. blank line starts a new paragraph. The job of %off is basically
  81. to format the paragraphs by adding/deleting spaces so that all lines
  82. in a paragraph are both right and left indented by the same amount.
  83. An example follows:
  84.  
  85. %example
  86.      As I was walking down                       As I was walking down the road
  87.      the     road   next                         next to my  house  I  heard  a
  88.      to                                          voice:
  89.      my house I heard a voice:
  90.                                                  "You started a  new  paragraph
  91.      "You started a new                          you stupid!"
  92.      paragraph you stupid!"
  93. %end
  94.  
  95. All the commands that %off understands have the '\%' character in
  96. front of them, e.g. '\%center', '\%macro'. Then the command name
  97. follows, %under without %norm any space between the '\%' and the
  98. command name. %bold A space before or after a command is optional. %norm
  99.  
  100. If you want to actually print the character '\%', precede it with a backslash 
  101. (\\). If want to print the backslash, precede it with another backslash 
  102. (or else it will be ignored):
  103.  
  104. %example
  105.      Some characters: \\\%, \\\\, \\\\\\\%                    Some characters: \%, \\, \\\%
  106. %end
  107.  
  108. In most of the cases you won't need to use (m)any commands. For
  109. example if you are writing a letter to somebody 
  110. then probably you just want %off to format your paragraphs 
  111. (instead of doing it by hand!) and nothing else.
  112.  
  113. In case you want to do fancy things (e.g. center some lines)
  114. then you probably need to know some of the commands %off offers.
  115. Tutorial sections for the commands follow and the complete list
  116. is given for reference at the end of this document.
  117.  
  118. %header Attributes %right Page %pn
  119. %newpage
  120. %center %under ATTRIBUTES
  121. %title
  122.  
  123. %off has 4 commands to control the appearance of text when displayed
  124. or printed: 
  125.  
  126. %center \%bold, \%norm, \%rev, \%under.
  127.  
  128. %under \%bold %norm makes text appear in bold style; %under \%rev %norm 
  129. makes text appear reversed (black characters on white background or vice 
  130. versa); %under \%under %norm produces underlined text; %under \%norm %norm
  131. resets everything to normal.
  132.  
  133. %under NOTE: %norm When %off output is sent directly to a printer
  134. (%bold -p %norm command line option,) then reversed characters actually 
  135. appear as %rev italics. %norm
  136.  
  137. %example
  138.      Different attributes:                              Different attributes:
  139.  
  140.      \%bold bold \%rev reverse \%under                     %boldbold %revreverse%norm %underunderlined%norm
  141.      underlined %norm
  142. %end
  143.  
  144. %header Line Control Commands %right Page %pn
  145. %newpage
  146. %center %under LINE CONTROL COMMANDS %norm
  147. %title
  148.  
  149. You can tell %off to treat a line of text in a special way, using
  150. the commands:
  151.  
  152. %center \%center, \%right, \%trio, \%verb.
  153.  
  154. %under \%center %norm will center a line; %under \%right %norm will flush a 
  155. line towards the right end of the screen; %under \%trio %norm will produce a 
  156. line consisting of 3 parts: a flushed-left, a centered and a flushed-right 
  157. part; %under \%verb %norm will produce a line preserving all the spaces you 
  158. typed (i.e. verbatim line, unlike lines inside paragraphs.)
  159.  
  160. When %off meets any of the above commands in your document, then it
  161. will read the rest of the line and process it accordingly.
  162.  
  163. %example
  164.      Look at the following three lines,      Look at the following three  lines
  165.      that illustrate \\\%center,               that illustrate  \%center,  \%right,
  166.      \\\%right, \\\%trio and \\\%verb.             \%trio and \%verb.
  167.  
  168.      \%center Centered                                     Centered
  169.      \%right  Flushed right                                        Flushed right
  170.      \%trio L \%center C \%right R              L               C                R
  171.      \%verb Lots       of  spaces    !        Lots       of  spaces    !
  172. %end 
  173.  
  174. As you can see in the last example, a \%trio line should be typed as
  175.  
  176. %center \%trio <left text> \%center <center text> \%right <right text>
  177.  
  178. to create the 3-part line. You can omit any of the 3 parts if you wish. For
  179. example,
  180. %center \%trio <left text> \%right <right text>
  181. will produce a line with a left and a right part only.
  182.  
  183. Some things should be noted about the \%verb command:%nl 
  184. (a) it outputs spaces exactly as they appear in your document, even if these 
  185. spaces are preceded by a command. For example,
  186. %center \%verb a \%bold b 
  187. will produce
  188. %verb          --> a %bold b%norm
  189. while,
  190. %center \%verb a\%boldb
  191. will produce
  192. %verb          --> a%boldb%norm
  193. So watch your spaces! %nl 
  194. (b) keep in mind that %bold the 1st space appearing after a \%verb command 
  195. is always ignored. %norm %nl
  196. (c) no indentation exists for verbatim lines, i.e. output begins at column 
  197. 0 always.
  198.  
  199. Inside a line that is to be formatted by the above commands, %off only 
  200. understands the %under \%bold, \%endcol, \%newpage, \%norm, \%rev, 
  201. \%startcol, \%under, \%[ and \%] %norm commands. The last two commands do 
  202. not make any sense inside a \%verb line, of course.
  203.  
  204. %nl
  205.  
  206. In the case you want to have many lines formatted by the above commands,
  207. instead of typing the command name in the beginning of each line, you can
  208. use the %under \%begin %norm command, as follows:
  209.  
  210. \%begin <command_name> %nl
  211. ... %nl
  212. ... (lines to be processed) %nl
  213. ... %nl
  214. \%end
  215.  
  216. Do not forget the %under \%end %norm at the end!
  217.  
  218. %example
  219.      Here is a bunch of centered                    Here is a bunch of centered
  220.      lines, using the \\\%begin center                lines,  using  the   \%begin
  221.      command:                                       center command:
  222.      
  223.      \%begin center                                           First line
  224.      First line                                           Second line now
  225.      Second line now                                       The last line
  226.      The last line
  227.      \%end
  228. %end
  229.  
  230. You should keep in mind that whatever follows in the line of a 
  231. '\%begin <command_name>' or an '\%end' %bold is ignored. %norm
  232.  
  233. %header Lists %right Page %pn
  234. %newpage
  235. %center %under LISTS %norm
  236. %title
  237.  
  238. %off can easily create lists of things, using the %under \%list %norm
  239. command. A list consists of items and each item consists of paragraphs. 
  240. The items can be e